from django.template import Template
from google.appengine.api import users
from django.shortcuts import render_to_response as rtr

def start(request):
	user = users.get_current_user()
	data = {}
	if user:
		data["logged_in"] = True
		data["nickname"] = user.nickname()
		data["logout_url"] = users.create_logout_url("/")
		data["has_cv"] = True
	else:
		data["logged_in"] = False
		data["login_url"] = users.create_login_url("/")
	return rtr("index.html", data)
